package com.wenhao.netease.game;

import java.util.Scanner;

/**
 * @author Wenhao Tong
 * @create 2021-08-07 21:14
 */
public class Main3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int T = scanner.nextInt();
        long mod = 1000000007;
        for (int t = 0;t < T;t++) {
            int N = scanner.nextInt();
            int K = scanner.nextInt();

            for (int n = 0;n < N;n++) {
                int Ai = scanner.nextInt();
                int Wi = scanner.nextInt();

            }
        }
    }
}
